<div class="wrap">
<h2 id="add-new-user">
<?php echo _e("Edit Role");

?>
</h2>

<p>
<?php
echo _e("You can edit the role here.");

?>
</p>
<div id="ajax-response"></div>
<h3>
<?php
echo _e('Role Info');

?>
</h3>
<?php
if ('edit_role' == $_GET['action']) {
    $role_id = $_GET['role_id'];
} else {
    $role_id = null;
}
$role_info = getRoleInfo($role_id);
$form = initEditRoleForm();
echo $form->start();

?>
<table class="form-table">
<?php
$elements = initRoleFormElements($role_info);
$aModules = getOperate("0");
foreach($elements AS $element) {
    if (isset($element) && is_array($element)) {
        echo showFormRow($form, $element);
    } else {
        zeus_do_nothing();
    }
}

?>
</table>
<h3>
<?php
echo _e('Role Capability');
$elements = array(
    array("label" => array("for" => "select_all_role"),
        "form" => array("type" => "checkbox", "name" => _e('Select All'),
            "options" => array("name" => "selectAllRole", "id" => "selectAllRole", "onclick" => "xajax_selectAllRole(this.checked);return false;"))));
foreach($elements AS $element) {
    if (isset($element) && is_array($element)) {
        echo showFormRow($form, $element);
    } else {
        zeus_do_nothing();
    }
}

?>
</h3>

<table class="form-table">
<?php
if (isset($aModules) && null != $aModules) {
    foreach($aModules AS $module) {
        echo showRoleFormCheck($form, $module, $role_info);
    }
}

?>
</table>
<p class="submit">
<?php
echo $form->addElement("submit", array("name" => "sv-form", "id" => "wp-submit", "value" => _e("Edit Role")));

?>
</p>
<?php
echo $form->end();
$form = null;
unset($form);

?>

</div>